package com.meritdata.cloud.data.service.development.repository;

import com.meritdata.cloud.data.service.development.model.DataApiCategory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;

import javax.transaction.Transactional;
import java.util.Date;

public interface IDataApiCategoryDao extends JpaRepository<DataApiCategory,Long>, QuerydslPredicateExecutor<DataApiCategory> {
    @Modifying
    @Transactional
    @Query("update DataApiCategory as c set c.name=:name ,c.updateTime=:updateTime where c.id=:id")
    public int update(Long id, String name, Date updateTime);
}
